package com.ruoyi.finance.service.impl;

import com.ruoyi.finance.domain.FmsShop;
import com.ruoyi.finance.mapper.FmsShopMapper;
import com.ruoyi.finance.service.IFmsShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 店铺 服务层实现
 *
 * @author 夜雨
 */
@Service
public class FmsShopServiceImpl implements IFmsShopService {
    @Autowired
    private FmsShopMapper shopMapper;

    /**
     * 查询店铺
     *
     * @param shopId 店铺ID
     * @return 店铺
     */
    @Override
    public FmsShop selectShopById(Long shopId) {
        return shopMapper.selectShopById(shopId);
    }

    /**
     * 查询店铺列表
     *
     * @param shop 店铺
     * @return 公告集合
     */
    @Override
    public List<FmsShop> selectShopList(FmsShop shop) {
        return shopMapper.selectShopList(shop);
    }

    /**
     * 新增店铺
     *
     * @param shop 店铺
     * @return 结果
     */
    @Override
    public int insertShop(FmsShop shop) {
        return shopMapper.insertShop(shop);
    }

    /**
     * 修改店铺
     *
     * @param shop 店铺
     * @return 结果
     */
    @Override
    public int updateShop(FmsShop shop) {
        return shopMapper.updateShop(shop
        );
    }

    /**
     * 删除店铺
     *
     * @param shopId 店铺ID
     * @return 结果
     */
    @Override
    public int deleteShopById(Long shopId) {
        return shopMapper.deleteShopById(shopId);
    }

    /**
     * 批量删除店铺
     *
     * @param shopIds 需要删除的店铺ID
     * @return 结果
     */
    @Override
    public int deleteShopByIds(Long[] shopIds) {
        return shopMapper.deleteShopByIds(shopIds);
    }
}
